package com.zx.framework.core.util;

import java.util.HashMap;
import java.util.Map;

import com.zx.framework.core.util.gson.GsonUtil;
/**
 * 用于返回值的链式操作
 * @author stylewolf
 *
 * @param <K>
 * @param <V>
 */
public  class ChainMap<K,V>{
	
	private Map<K,V> map = new HashMap<K, V>();
	
	public ChainMap<K,V> put(K key,V val){
		map.put(key, val);
		return this;
	}
	
	public Map<K,V> getMap(){
		return this.map;
	}
	
	public String toString(){
		return GsonUtil.object2Json(map);
	}
}